local ClientOHOH = _G.ClientOHOH;

local M = ClientOHOH.class.new(script, ClientOHOH.files.OHOHOLYBUIBase());
local CallBackManager = ClientOHOH.load.CallBackManager();
local BtnHelper = ClientOHOH.load.BtnHelper();
local LanguageHelper=_G.LanguageHelper 

local CommonOHOH =_G.CommonOHOH

local CellCalss=require(script.CellObj)



function InitInsts(ui)
	ui.insts = {};

	ui.insts.close ="ctrl.close"
    ui.insts.cell ="ctrl.cell"

end

function M.new(...)
	return M(...);
end;


function M.ctor(self)
	InitInsts(self)
	
	M.super.ctor(self, ClientOHOH:GetPath_Loop("ReplicatedStorage.Resource.UI.TeleportGui"));

    CallBackManager:AddRbxConnect(self,self.insts.close.Activated, function()
        self:Hide()
	end);

    self.insts.cell.Visible=false
end;



function M.InitData(self,list)	

    self.insts.CellList={}

    for _,v in pairs(list) do
        local cell=self.insts.cell:Clone()
        cell.Parent=self.insts.cell.Parent
        cell.Visible=true

       local obj=  CellCalss.new(cell,v,v.thumbnail)
        

    end
end

function M.Update(self,list)


end


function M.dtor(self)
	M.super.dtor(self);
end;


return M
